import request from '../uniHttp';

// 获取所有数据
export const getTasksList = async (data?: object|any) => {
  return await request('/tasks/getTasksList', 'post', data);
}

// 获取指定ID数据
export const getTasksById = async (id?: string|number) => {
  return await request('/tasks/getTasksById', 'get', id);
}

// 添加数据
export const addTasks = async (data?: object|any) => {
  return await request('/tasks/addTasks', 'post', data);
}

// 删除数据
export const deleteTasks = async (id?: string|number) => {
  return await request('/tasks/deleteTasks', 'delete', id);
}

// 更新数据
export const updateTasks = async (data?: object|any) => {
  return await request('/tasks/updateTasks', 'post', data);
}
